import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入element-ui组件和css
import ElementUi from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

Vue.use(ElementUi);

// Leaflet
import "leaflet/dist/leaflet.css";
import L from "leaflet";

delete L.Icon.Default.prototype._getIconUrl;
L.Icon.Default.mergeOptions({
  iconRetinaUrl: require("leaflet/dist/images/marker-icon-2x.png"),
  iconUrl: require("leaflet/dist/images/marker-icon.png"),
  shadowUrl: require("leaflet/dist/images/marker-shadow.png")
});

// axios
import axios from "./axios/http";
import VueAxios from "vue-axios";

Vue.use(VueAxios, axios);

// echarts
import echarts from "echarts";

Vue.prototype.$echarts = echarts;

// util
import utils from "./utils/commom";

Vue.prototype.utils = utils;

// gps
import gps from "./utils/gps";

Vue.prototype.gps = gps;

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
